package com.cskaoyan.vo.market;

import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;

import java.util.List;

/**
 * @program: mall
 * @description:
 * @author: Mr.Mengmeng
 * @create: 2021-04-09 23:21
 **/
@Data
@JsonInclude(JsonInclude.Include.NON_NULL)
public class CategoryVo {

    /**
     * id : 1005001
     * name : 餐厨
     * keywords : 号
     * desc : 爱
     * iconUrl : http://yanxuan.nosdn.127.net/ad8b00d084cb7d0958998edb5fee9c0a.png
     * picUrl : http://yanxuan.nosdn.127.net/3708dbcb35ad5abf9e001500f73db615.png
     * level : L1
     * children : [{"id":1005007,"name":"锅具","keywords":"哈哈哈","desc":"撒好像","iconUrl":"http://yanxuan.nosdn.127.net/4aab4598017b5749e3b63309d25e9f6b.png","picUrl":"http://yanxuan.nosdn.127.net/d2db0d1d0622c621a8aa5a7c06b0fc6d.png","level":"L2"}]
     */

    private Integer id;
    private String name;
    private String keywords;
    private String desc;
    private String iconUrl;
    private String picUrl;
    private String level;
    private Integer pid;
    private List<ChildrenBean> children;

    public CategoryVo(Integer id, String name, String keywords, String desc, String iconUrl, String picUrl, String level, Integer pid, List<ChildrenBean> children) {
        this.id = id;
        this.name = name;
        this.keywords = keywords;
        this.desc = desc;
        this.iconUrl = iconUrl;
        this.picUrl = picUrl;
        this.level = level;
        this.pid = pid;
        this.children = children;
    }

    public CategoryVo(Integer id, String name, String keywords, String desc, String iconUrl, String picUrl, String level, Integer pid) {
        this.id = id;
        this.name = name;
        this.keywords = keywords;
        this.desc = desc;
        this.iconUrl = iconUrl;
        this.picUrl = picUrl;
        this.level = level;
        this.pid = pid;
    }

    public CategoryVo() {
    }
    @Data
    public static class ChildrenBean {
        /**
         * id : 1005007
         * name : 锅具
         * keywords : 哈哈哈
         * desc : 撒好像
         * iconUrl : http://yanxuan.nosdn.127.net/4aab4598017b5749e3b63309d25e9f6b.png
         * picUrl : http://yanxuan.nosdn.127.net/d2db0d1d0622c621a8aa5a7c06b0fc6d.png
         * level : L2
         */

        private Integer id;
        private String name;
        private String keywords;
        private String desc;
        private String iconUrl;
        private String picUrl;
        private String level;

        public ChildrenBean(Integer id, String name, String keywords, String desc, String iconUrl, String picUrl, String level) {
            this.id = id;
            this.name = name;
            this.keywords = keywords;
            this.desc = desc;
            this.iconUrl = iconUrl;
            this.picUrl = picUrl;
            this.level = level;
        }

        public ChildrenBean() {
        }
    }
}
